The CFS2/FS2002 MDL file format provides the aircraft designer with much more flexibility in texture handling. As it happens very often too much flexibility confuses the end user. Here is a short presentation of the texture allocation system implemented by FS2002.
All the textures used in an assembly must be declared in a texture list. CFS2/FS2002 supports different formats, ranging from the very basic bitmap format to the complex DXT3 multi-size format. Except for the standard bitmap format, these formats allows for alpha effects or transparency (colorkey attribute). The alpha parameter can be used either for alpha blending or to create a specular effect. In case the texturing mode is inhibited or the texture file can't be found, FS uses a so-called fallback color which is defined by its red, blue, green and alpha attributes. Each texture can be assigned a different fallback color.
A sub-assy may be textured or colored. When it is colored, a sub-assy can be given a certain level of transparency and a glaring effect. Color, transparency index and glaring effect are handled through the material concept. When it is textured, a sub-assy is assigned one of the declared assembly textures (see here above). Of course, a texture can be assigned to different sub-assies. Each sub-assy / texture set is associated with a material, the color of which can be different from the texture fallback color. A sub-assy can be declared as a no-shadow thing, a usefull feature if you don't want to see a plain shadow associated with a canopy or the transparent disk modelling a propeller at full speed.
Textures and materials
The FS viewer uses the DirectX standard to display objects on your computer screen. The DirectX standard handles the colors and the illumination of an object through two concepts:
Let us take a sub-assy. To make it simple, you can consider that this sub-assy is a bulk of material. The characteristics of a material are:
You can use this sub-assy as it is: a piece of raw material. In that case, you just have to specify the material of which it is made up. The color sub-panel at the bottom of the sub-assy code display window allows you to do that. ![]() the color sub-panel
Textures
![]() the texture support selection window The FS viewer supports several kind of textures: simple bitmap files, DXT files, mipmaps... AD2K2 handles a restricted sub-set of formats the characteristics of which are given here after:
When it is loaded into the texture list, a texture must be given an attribute:
Let us have a look at the following example. I suppose we plan to use seven texture files:
Indeed, when you assign a texture to a sub-assy, the FS viewer browses the texture list to check the attribute of the textures immediately following the selected texture. Therefore, the list here above is interpreted as follows:
Special effects
|
AD2K2 handles textures and materials in the following way:
Texture supports
The texture supports are simple polygons which you declare as texture support by simply selecting them on
the graphic display window and activating the Utilities/Define as texture support menu option. AD2K2
keeps a list of them so that you can load any one of them from the texture support selection window. The texture supports are discussed in a
dedicated section in this tutorial.
Colored sub-assy
To be displayed properly by the FS viewer, a sub-assy must be declared as textured or colored.
When it is first created, the status of a sub-assy is undefined. If you do not assign a valid status to the sub-assy,
it will not be displayed by the FS viewer.
To assign the color attribute to a sub-assy, select the color option in the combo-box of the sub-assy sub-panel in the sub-assy panel.
You need then to define the material associated with the sub-assy. Open the sub-assy code window by clicking on the
button of the sub-assy panel. At the bottom of the window, the color sub-panel allows you to specify the attributes of the material:
Textured sub-assy
To assign a texture to a sub-assy, select the appropriate texture file in the combo-box of the sub-assy sub-panel in the sub-assy
panel. The combo-box lists all the texture files available in the model texture list.
As it is explained in the previous section, you also need to define the material associated with the sub-assy. Open the
sub-assy code window by clicking on the button of the sub-assy panel. At the bottom of the window, the color sub-panel
allows you to specify the attributes of the material:
Texture declaration
The texture declaration is achieved through the texture selection panel. The
texture selection panel can be launched either from the sub-assy panel or from
the sub-assy code panel by clicking on the button on the tool bar. The texture
selection panel allows you to load a new texture file, to discard a file already selected, to select the fallback color associated
with a texture and to select the texture kind.
Texture kind: To select the texture kind, select the given texture in the texture file list
and then the texture kind in the combo-box below.
The following selection is available:
Tip: If the texture selection panel is launched from the sub-assy code panel, the texture which is selected when you exit the panel is automatically assigned to the currently selected sub-assy. If the texture selection panel is launched from the sub-assy panel, selecting a texture in the list and exiting the panel has no effect on the texture associated to the currently selected sub-assy. |
Assigning a texture to a sub-assy
Caution: Do not assign a N texture or a L texture to a sub-assy. |
Assigning a color to a sub-assy
In the sub-assy code panel, double-click on the small colored square at the bottom of the panel. A color palette is displayed. To select a color in the palette, click on it and validate. To create a new color, click on the new button to launch the color editor. To modify a color of the palette, click on it and then click on the modify button to launch the color editor. The palette just keeps the color actually used in the assembly (i.e associated to a sub-assy or to a LCOLOR instruction). A color which is not used is discarded from the palette.
Transparency and shadow
To give a certain level of transparency to a colored sub-assy, use the transparency up-down buttons at the bottom of the sub-assy code panel.
The transparency control is turned into a shadow/no shadow control in case of textured sub-assy.
Glaring effect and reflected color
To set a glaring effect, check the glare check box at the bottom of the sub-assy code panel.
When the glare check box is checked, a reflected color selection panel is displayed. Proceed as for the
sub-assy color selection to set the reflected color.
item | requirement | menu option | action | from...
texture
| load the texture file in
| the model texture list (1) ![]() open the texture selection | window sub-assy panel or
| sub-assy code window load the texture file
| texture selection window
| square set fallback color
| texture selection window
| set texture kind
| texture selection window
| associate the texture | with the sub-assy ![]() select the sub-assy
| sub-assy panel
| ![]() select the texture file
| sub-assy panel
| material
| define the material
| associated with the sub-assy ![]() select the sub-assy
| sub-assy panel
| ![]() open sub-assy code window
| sub-assy panel
| square select material color
| sub-assy code window
| ![]() set shadow / transparency
| sub-assy code window
| square set glare effect
| select reflected color sub-assy code window
| texture | support define a texture support
| as many times as needed (2) ![]() select a chain
| graphic display window
| as texture support define the chain as texture | support graphic display window
| texture | limits define texture limits
| as many times as needed (3) ![]() select the sub-assy
| sub-assy panel
| ![]() open sub-assy code window
| sub-assy panel
| ![]() select the LIMITS instruction
| or the place to insert it sub-assy code window
| ![]() insert a new LIMITS instruction
| (if needed) sub-assy code window
| ![]() ![]() open the texture limits window
| sub-assy code window
| ![]() select the texture support
| and orientation texture support | selection window select the texture limits
| texture support | selection window |
Click on...
Double-click on...
(1) If a night texture or a light texture is to be used, you just have to load it
just after the basic texture it is associated with and declare it as a night map or a light map.
(2) Several texture supports can be used with the same sub-assy.
(3) A same sub-assy can be assigned several sets of texture support/texture limits.